home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / thandlr.exe / THANDLER.HPP < prev    next >
C/C++ Source or Header  |  1993-02-14  |  2KB  |  66 lines

  1. /*-----------------------------------------------------------------------*/
  2. /* filename -       thandler.hpp                                         */
  3. /*                                                                       */
  4. /* function(s)                                                           */
  5. /*                  declarations for the THandler class                  */
  6. /*                                                                       */
  7. /* author -         Michael Newton                                       */
  8. /*                                                                       */
  9. /*-----------------------------------------------------------------------*/
  10.  
  11. /*-----------------------------------------------------------------------*/
  12. /*                                                                       */
  13. /*    THANDLER.HPP                                                       */
  14. /*                                                                       */
  15. /*    THandler Version 1.01                                              */
  16. /*    Copyright (C) 1992, 1993 Michael Newton                            */
  17. /*    All Rights Reserved.                                               */
  18. /*                                                                       */
  19. /*-----------------------------------------------------------------------*/
  20.  
  21.  
  22.  
  23.  
  24. #if !defined __THANDLER_HPP
  25. #define __THANDLER_HPP
  26.  
  27.  
  28. #include <tv.h>
  29.  
  30.  
  31. typedef void interrupt (far *fptr)(...);
  32. typedef unsigned char       byte;
  33. typedef unsigned int        word;
  34. typedef unsigned int far    *fpword;
  35. typedef void                *pvoid;
  36. typedef void far            *fpvoid;
  37.  
  38.  
  39.  
  40. #define MAXERRWIDTH 52
  41.  
  42. const ignoreOK   = 0x2000;
  43. const retryOK    = 0x1000;
  44. const failOK     = 0x0800;
  45. const driveMask  = 0x00FF;
  46. const bit07      = 0x0080;
  47.  
  48.  
  49. class THandler
  50. {
  51.    public:
  52.       THandler(Boolean isSound = True);
  53.       ~THandler();
  54.       void suspend();
  55.       void resume();
  56.       void setSound(Boolean isSound);
  57.       Boolean getSound();
  58.    private:
  59.       static void interrupt (far *oldInt24)(...);
  60.       static void far newInt24(word ax, word di, fpword bpsi);
  61. };
  62.  
  63.  
  64.  
  65. #endif                            // End of __THANDLER_HPP
  66.